home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Complete Linux
/
Complete Linux.iso
/
xwindows
/
demos
/
xfract_1.z
/
xfract_1
/
xfractint-1.06
/
hc.doc
< prev
next >
Wrap
Text File
|
1992-09-28
|
17KB
|
535 lines
... First version documentation is followed by additional notes
... for features added in subsequent versions.
FRACTINT Help Compiler Source File Format
0. Contents
1.0 Help compiler input/output.
1.1 The source input file.
1.2 The header (.H) output file.
1.3 The binary (.HLP) output file.
2.0 Source (.SRC) file format.
2.1 Comments.
2.2 Defining the output filenames.
2.3 Defining the help file version.
2.4.0 Help topics.
2.4.1 Starting a help topic.
2.4.2.0 The help text.
2.4.2.1 Special characters.
2.4.3 Starting another page.
2.5.0 Labels.
2.5.1 The help index label (HELP_INDEX).
2.5.2 Private labels.
2.6.0 Hot-links.
2.6.1 Special hot-links.
2.7 Tables.
1.0 Help compiler input/output.
The Help Compiler converts a source file into two output files: a "C"
header file which is #included in FRACTINT and a binary file used at run-
time.
1.1 The source input file.
The Help compiler takes as input a help source file (.SRC). See x.x.x
for the .SRC file format. HELP.SRC is FRACTINT's help file source.
1.2 The header (.H) output file.
The header (.H) file contains a #define macro for each non-private label
(see 2.5.0) and for the help file version (see 2.3). The .H file is
included in FRACTINT and the macros are used to set the current help mode.
The Help Compiler will only modify the .H file when a non-private label
(see 2.5.0) is added or deleted or when the help file version (see 2.3)
is changed. This minimizes the times when FRACTINT will need to be re-
compiled. However, when the Help Compiler does modify the .H file it is
necessary to re-compile FRACTINT.
In FRACTINT this file is named HELPDEFS.H
1.3 The binary (.HLP) output file.
The .HLP file is the binary file where compiled help informnation is
stored. See HC.C and HELP.C if you're interested in the file format. In
FRACTINT the file is named FRACTINT.HLP. This file may be appended to
FRACTINT.EXE for distribution, see the Help Compiler command-line help
(type "HC" at the DOS prompt) more info.
2.0 Source (.SRC) file format.
The source file defines output files, help file version, topics, labels
and hypertext-style hot-links with commands and hot-links. Commands start
with a tilde ('~') in the first column of a line and continue to the end
of the line. Hot-links, defined within the text, are surrounded by curly-
braces ('{' and '}'). Comment lines, which may appear anywhere in the
file, start with a semicolon (';') in the first column and continue to
the end of the line.
2.1 Comments.
Any line starting with a semicolon (;) is a comment. The comment
continues to the end of the line and may appear anywhere in the file.
The semicolon must be in the first column of the line.
2.2 Defining the output filenames.
The output filenames are defined in the source file by the following
commands:
~HdrFile=H_FILE
~HlpFile=HLP_FILE
H_FILE is the .H filename and HLP_FILE is the .HLP filename. These
commands must appear before the first topic.
2.3 Defining the help file version.
The help file version number is stored in a special #define in the .H
file (named HELP_VERSION) and stored in the .HLP file header. If the
version number in HELP_VERSION does not match the version in the .HLP file
the file will not be used. This is mainly to make sure FRACTINT doesn't
try to read a help file other than the one the .EXE is expecting. To
define the help version:
~Version=nnn
Where nnn is a positive decimal version number. (Suggested format is 100
for version 1.00, 150 for version 1.50, etc.) This command must appear
before the first help topic. -1 will be used if the version is not defined
in the .SRC file.
2.4.0 Help topics.
The help topics come after the HdrFile=, HlpFile= and Version= commands
and continue until end-of-file.
2.4.1 Starting a help topic.
To start a new help topic use the following format:
~Topic=TITLE
"~Topic=" is the command to start a topic and TITLE is the text to display
at the top of each page. The title continues to the '\n' and may contain
up to 65 characters.
In the example:
~Title=Command Keys available while in Display Mode
"Command Keys avail..." is the TITLE which would displayed at the top of
each page.
2.4.2.0 The help text.
The help text for each topic can be several pages long. Each page is 22
rows by 78 columns. The first and last rows should be blank for the best
appearance.
2.4.2.1 Special characters.
To insert reserved characters (like ';', '~', '\' and '{') into the help
text precede the character with a backslash ('\'). To insert any character
(except null) into the text follow a backslash with a decimal (not hex
or octal) ASCII character code. For example:
\~ - puts a tilde in the text.
\24 - places an up-arrow in the text.
2.4.3 Starting another page.
To start a new page in the same topic put two tildes (~~) at the start
of a line. No other text is allowed on the line. Each page can be up to
22 lines long. (The Help Compiler will warn you if any page gets longer
than 22 lines.) For the best appearance the first and last lines should
be blank.
2.5.0 Labels.
A label is a name which in used to refer to a help topic. A label is
used in hot-links or in FRACTINT for context-sensitive help. When help
goes to a label (when a hot-link is selected or context-sensitive help
is called from FRACTINT) it goes to the page of the topic where the label
was defined.
To define a label for a topic insert the following command into the
topic's text:
~(NAME)
NAME is the name of the label. The name follows "C"-style conventions
for variable names. Case is significant. The label should start at the
beginning of a line and have no text following it on the line. The line
line will not appear in the help text.
For example, if this line:
~(HELPPLASMA)
was placed in page three of a topic using it in a hot-link (see 2.6.0)
or as context-sensitive help would "go to" page three of that topic. The
user would then be free to page up and down through the entire topic.
Each topic must have at least one label otherwise it could not be
referred to.
2.5.1 The help index label (HELP_INDEX).
When the user wants to go to the "help index" (by pressing F1 while
in help) help will go to a special label named "HELP_INDEX". Other than
the requirement that it be in every .SRC file you may treat it as any
other label. It can be used in links or as context-sensitive help.
2.5.2 Private labels.
A private label is a label which is local to the help file. It can be
used in hot-links but cannot be used as context-sensitive help. A private
label is a label with an "at sign" ('@') as the first character of its
name. The "at sign" is part of the name. In the example:
~(@HELPPLASMA)
"@HELPPLASMA" is a private label.
Private labels are not included in the .H file so you may add or delete
private labels without re-compiling FRACTINT. Each non-private label
takes up some memory (4 bytes) in FRACTINT so it's best to use private
labels whenever possible. Use private labels except when you want to use
the label as context-sensitive help.
2.6.0 Hot-links.
A hypertext-style hot-link to a label can appear anywhere in the help
text. To define a hot-link use the following syntax:
{LABEL TEXT}
LABEL is the label to link to and TEXT is the text that will be highlighted.
Only the TEXT field will appear on the help screen. No blanks are allowed
before the LABEL. In the sample hot-link:
{HELPMAIN Command Keys in display mode}
"HELPMAIN" is the LABEL and "Command keys in display mode" is the
TEXT to will be hightlighted.
2.6.1 Special hot-links.
In addition to normal hot-links to labels "special" links to custom
functions (built into HELP.C) are allowed. These hot-links have a
negative number (-2..) in plac